---
title: Knip
description:
  Project linter to find unused files, dependencies and exports in JavaScript
  and TypeScript projects
template: splash
hero:
  tagline:
    Find unused files, dependencies and exports in JavaScript and TypeScript
    projects
  image:
    file: ../../assets/logo.svg
  actions:
    - text: Let's Get Started
      link: ./overview/getting-started
      icon: right-arrow
      variant: primary
    - text: View on GitHub
      link: https://github.com/webpro-nl/knip
      icon: external
      variant: minimal
---

import { Card, CardGrid } from '@astrojs/starlight/components';
import { YouTube } from '@astro-community/astro-embed-youtube';
import Tweets from '../../components/Tweets.astro';
import Sponsors from '../../components/Sponsors.astro';
import Contributors from '../../components/Contributors.astro';

:::div{.sponsor}

Using Knip in a commercial project?<br />Please consider [sponsoring me][1]!

:::

<CardGrid stagger>
  <Card title="Getting Started" icon="rocket">

    Read [getting started][2] to install and run Knip

  </Card>

  <Card title="Why Use Knip?" icon="approve-check">

    Understand [what Knip can do for you][3]

  </Card>

  <Card title="Troubleshooting" icon="warning">

    Need help? [Start troubleshooting here][4]

  </Card>

  <Card title="Plugins" icon="list-format">

    Check out the [list of plugins][5]

  </Card>

  <Card title="Works with checker.ts" icon="approve-check">

    ^^ [New And More Valuable Checkbox™️][6]

  </Card>
</CardGrid>

## 🧡 Projects Using Knip

:::section{.columns.min300}

- [ArkType][7]
- [Backstage][8]
- [Cody (SourceGraph)][9]
- [Create TypeScript App][10]
- [ESLint][11]
- [freeCodeCamp][12]
- [Grafana][13]
- [Nuxt][14]
- [Release It!][15]
- [Svelte][16]
- [TanStack Query][17]
- [TanStack Table][18]
- [TypeScript (Microsoft)][19]
- [typescript-eslint][20]
- [TypeStat][21]

:::

## 🧡 Introduction Video

[James Shopland][22] created this great introduction and overview of Knip:

<YouTube id="uhEkgWt-pUM" />

## 🧡 Sponsors

Eternal gratitude to the companies and people that are already sponsoring me:

<Sponsors direction="row" showAll={false} />

Please see [Sponsors][1] for the full list, and how you can become a sponsor of
Knip.

## 🧡 Contributors

Special thanks to the wonderful people who have contributed to this project:

<Contributors />

## 🧡 Articles

- Smashing Magazine: [Knip: An Automated Tool For Finding Unused Files, Exports,
  And Dependencies][23]
- Effective TypeScript: [Recommendation Update: ✂️ Use knip to detect dead code
  and types][24]
- Maddy Miller: [Using Knip to find dead code in a high-traffic git repo][25]
- Josh Goldberg: [Speeding Up Centered Part 4: Unused Code Bloat][26]

## 🧡 Testimonials

<Tweets />

[1]: ./sponsors
[2]: ./overview/getting-started.mdx
[3]: ./explanations/why-use-knip.md
[4]: ./guides/troubleshooting.md
[5]: ./reference/plugins.md
[6]: https://x.com/robpalmer2/status/1805502964435505559
[7]: https://github.com/arktypeio/arktype
[8]: https://github.com/backstage/backstage
[9]: https://github.com/sourcegraph/cody
[10]: https://github.com/JoshuaKGoldberg/create-typescript-app
[11]: https://github.com/eslint/eslint
[12]: https://github.com/freeCodeCamp/freeCodeCamp
[13]: https://github.com/grafana/grafana
[14]: https://github.com/nuxt/nuxt
[15]: https://github.com/release-it/release-it
[16]: https://github.com/sveltejs/svelte
[17]: https://github.com/TanStack/query
[18]: https://github.com/TanStack/table
[19]: https://github.com/microsoft/TypeScript
[20]: https://github.com/typescript-eslint/typescript-eslint
[21]: https://github.com/JoshuaKGoldberg/TypeStat
[22]: https://www.jamesshopland.com
[23]:
  https://www.smashingmagazine.com/2023/08/knip-automated-tool-find-unused-files-exports-dependencies/
[24]: https://effectivetypescript.com/2023/07/29/knip/
[25]: https://madelinemiller.dev/blog/knip-dead-code/
[26]:
  https://www.joshuakgoldberg.com/blog/speeding-up-centered-part-4-unused-code-bloat/
